package cn.wolfcode.trip.app.controller;

import cn.wolfcode.trip.base.domain.Accumulate;
import cn.wolfcode.trip.base.service.IAccumulateService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

//累计金额
@RestController
@RequestMapping("accumulates")
public class AccumulateController {
    @Autowired
    private IAccumulateService accumulateService;

    @RequestMapping("deposits")
    public Accumulate getAll1(Long id) {
        Accumulate accumulate = accumulateService.selectDeposit(id);
        return accumulate;
    }

    @RequestMapping("/recharges/{id}")
    public Accumulate getAll(@PathVariable Long id) {
        Accumulate accumulate = accumulateService.selectRecharge(id);
        return accumulate;
    }
}
